home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12138 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: taco.cc.ncsu.edu!rbsteven
  2. From: rbsteven@eos.ncsu.edu (Robert Barclay Stevenson)
  3. Newsgroups: comp.lang.c++
  4. Subject: HELP 2d dynamically allocated array
  5. Date: 17 Mar 1996 18:06:06 GMT
  6. Organization: North Carolina State University, Project Eos
  7. Distribution: world
  8. Message-ID: <4ihkae$8nt@taco.cc.ncsu.edu>
  9. Reply-To: rbsteven@eos.ncsu.edu (Robert Barclay Stevenson)
  10. NNTP-Posting-Host: prez.sod.ncsu.edu
  11. Keywords: help, arrays
  12. Originator: rbsteven@prez.sod.ncsu.edu
  13.  
  14.  
  15. Hey there...
  16.  
  17.     I am trying to figure out a way to effectively dynamically allocate a 2d
  18. array using new and delete operators.  I have tried using multiple indirection
  19. on something like:
  20.  
  21. int **array_;  //is this the same as array_[] ?
  22.  
  23. And then use something like:
  24.  
  25. array[depth] = new int[width];
  26.  
  27. But I think I has missed the boat somewhere along the way.  If someone could 
  28. please point me in the right direction or send me a sample, I would be very
  29. grateful.  Thanks a lot.
  30. -- 
  31. --------------------------------------------------------------------------------
  32. Robert Stevenson                 | "Virtual Reality won't merely replace TV.
  33. North Carolina State University  |  It will eat it alive." A.C. Clarke 
  34.                                  |          
  35.